﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using FluentValidation;
using SqlSugar;

namespace SH.Room.Domain.RoomClass
{
    /// <summary>
    /// 房型表
    /// </summary>
    public class RoomType
    {
        /// <summary>
        /// 房型ID 
        /// </summary>
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
        public int Rtid { get; set; }

        /// <summary>
        /// 房型名称  
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(20)")]
        public string? Rtname { get; set; }

        /// <summary>
        /// 门市价  
        /// </summary>
        public decimal Rprice { get; set; }

        /// <summary>
        /// 押金
        /// </summary>
        public decimal Deposit { get; set; }

        /// <summary>
        /// 房屋面积 
        /// </summary>
        public int Rarea { get; set; }

        /// <summary>
        /// 可住人数
        /// </summary>
        public int Roccupancy { get; set; }

        /// <summary>
        /// 房间数量
        /// </summary>
        public int? RoomCount { get; set; } = 0;

        /// <summary>
        /// 排序  
        /// </summary>
        public int? Rsort { get; set; } = 0;

        /// <summary>
        /// 房型图片（通常这里存的是图片路径或URL）  
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(300)")]
        public string Rpicture { get; set; }

        /// <summary>
        /// 房型介绍
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(50)")]
        public string Rdescription { get; set; }

        /// <summary>
        /// 租户ID  
        /// </summary>
        public string? TenantId { get; set; } = "zhangsan";

    }
    //[SugarColumn(IsIgnore = true)]
    //public class AppInfoalidator : AbstractValidator<RoomType>
    //{
    //    public AppInfoalidator()
    //    {
    //        RuleFor(x => x.Rtname).NotEmpty().WithMessage("必须大于或等于4个字符");

    //    }
    //}
}
